<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 400px;
            height: 300px;
            background-color: #000;
            position: relative;
        }

        .a {
            /* height: 200px; */
            background-color: #ff0;
            position: absolute;

            /* 强制行内或者行内块级元素不换行 */
            white-space: nowrap;
            font-size: 0;
        }

        .a1 {
            width: 200px;
            height: 100px;
            border: 1px solid #000;
            /* margin: 10px; */
            /* float: left; */
            background-color: #f00;

            display: inline-block;
            font-size: 14px;
            vertical-align: top;
        }
    </style>
</head>

<body>

    <!-- 
        浮动宽度超出以后一定会换行 

        实现左右排列的第二方法   inline-block   注意图片向文字一样的东西    文本强制不换行
     -->




    <div class="box">
        <div class="a">
            <div class="a1">q11</div>
            <div class="a1"></div>
            <div class="a1"></div>
            <div class="a1"></div>
        </div>
    </div>

</body>

</html>